package com.pattern.observer;

import java.util.Observable;

/**
 * @Description: 原油期货,具体目标
 * @Author: whp
 * @Date: 2021-01-28 17:50
 */
public class OilFetures extends Observable {
    private float price;

    public float getPrice(){
        return this.price;
    }
    public void setPrice(float price){
        //注明 数据以变化
        super.setChanged();
        super.notifyObservers(price);
        this.price=price;
    }
}
